package com.gw.smscheck.service.business.alarm.impl;

import java.util.List;

import com.gw.smscheck.dao.business.alarm.AlarmEnterAreaMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.gw.smscheck.entity.business.alarm.AlarmEnterArea;
import com.gw.smscheck.service.business.alarm.AlarmEnterAreaService;
@Service
public class AlarmEnterAreaServiceImpl implements AlarmEnterAreaService {
	@Autowired
	private AlarmEnterAreaMapper alarmEnterAreaMapper;
	@Override
	public Integer add(AlarmEnterArea alarmEnterArea) {
		return alarmEnterAreaMapper.add(alarmEnterArea);
	}
	@Override
	public List<AlarmEnterArea> findAll() {
		return alarmEnterAreaMapper.findAll();
	}
	@Override
	public PageInfo<AlarmEnterArea> pageSelect(AlarmEnterArea dto) {
		PageHelper.startPage(dto.getPage(), dto.getRows(), "create_time desc");// 排序
		List<AlarmEnterArea> resultList = alarmEnterAreaMapper.pageSelect(dto);
		PageInfo<AlarmEnterArea> pageInfo = new PageInfo<>(resultList);
		return pageInfo;
	}
	@Override
	public AlarmEnterArea findById(Integer dto) {
		return alarmEnterAreaMapper.findById(dto);
	}
	@Override
	public Integer update(AlarmEnterArea alarmEnterArea) {
		return alarmEnterAreaMapper.update(alarmEnterArea);
	}
	@Override
	public Integer delByIds(String[] ids) {
		return alarmEnterAreaMapper.delByIds(ids);
	}
}

